package com.codingx.model;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Teacher implements Comparable<Teacher>{
    private Integer no;
    private String sex;
    private String name;
    private String classNo;
    private int core;
    //JDK8之前排序写法
    @Override
    public int compareTo(Teacher o) {
        return this.core-o.core;
    }
}
